home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 October: Technology Seed / ADC Seed CD - October 1999.toast / FireWire / FireWire_2.0_SDK / Source / AVTransport / AVTransportTrafficLight / AVTransportTrafficLight.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-04-12  |  4.3 KB  |  159 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        AVTransportTrafficLight.h
  3.  
  4.     Contains:    Definitions for AVTransportTrafficLight application.
  5.  
  6.     Written by:    Erik Staats
  7.  
  8.     Copyright:    © 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.        <FW5>      7/8/96    ES        Added support for extra menu and snap shot grabbing and playing
  13.                                     capabilities.
  14.        <FW4>     6/20/96    ES        Made this look more a .i generated interface.
  15.        <FW3>     6/20/96    ES        Modified contains field.
  16.        <FW2>     6/20/96    ES        Filled in contains and written by fields.
  17.        <FW1>     6/20/96    ES        first checked in
  18.  
  19. */
  20.  
  21. #ifndef __AVTRANSPORTTRAFFICLIGHT__
  22. #define __AVTRANSPORTTRAFFICLIGHT__
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. #if PRAGMA_IMPORT_SUPPORTED
  29. #pragma import on
  30. #endif
  31.  
  32. #if PRAGMA_ALIGN_SUPPORTED
  33. #pragma options align=mac68k
  34. #endif
  35.  
  36. enum
  37. {
  38.     kDumpBufferSize                = 1000000
  39. };
  40.  
  41. // These are for positioning the Disk Initialization dialogs.
  42.  
  43. #define kDITop                    0x0050
  44. #define kDILeft                    0x0070
  45.  
  46. // kExtremeNeg and kExtremePos are used to set up wide open rectangles and
  47. // regions.
  48.  
  49. #define kExtremeNeg                (-32768)
  50. #define kExtremePos                (32767 - 1)                // Required to address an old region bug
  51.  
  52. enum
  53. {
  54.     kInvalidWindowRef            = 0
  55. };
  56.  
  57. enum
  58. {
  59.     kMenuBarResourceID            = 128,
  60.  
  61.     kTrafficLightWindowResourceID    = 128,
  62.  
  63.     kStopRectResourceID            = 128,
  64.     kGoRectResourceID            = 129,
  65.  
  66.     kAboutAlertResourceID        = 128
  67. };
  68.  
  69. enum
  70. {
  71.     kAppleMenuID                = 128,
  72.     kAboutAppleMenuItem            = 1,
  73.  
  74.     kFileMenuID                    = 129,
  75.     kNewFileMenuItem            = 1,
  76.     kCloseFileMenuItem            = 4,
  77.     kQuitFileMenuItem            = 12,
  78.  
  79.     kEditMenuID                    = 130,
  80.     kUndoEditMenuItem            = 1,
  81.     kCutEditMenuItem            = 3,
  82.     kCopyEditMenuItem            = 4,
  83.     kPasteEditMenuItem            = 5,
  84.     kClearEditMenuItem            = 6,
  85.  
  86.     kExtraMenuID                = 131,
  87.     kCaptureSnapShotMenuItem    = 1,
  88.     kPlaySnapShotMenuItem        = 2,
  89.     kStopSnapShotMenuItem        = 3
  90. };
  91.  
  92. struct AVTTrafficLightAppDataStruct
  93. {
  94.     QDGlobals                    qdGlobals;                // Quickdraw globals for our application.
  95.  
  96.     struct TrafficLightDataStruct
  97.                                 *trafficLightDataList;    // List of traffic lights.
  98.  
  99.     Rect                        stopRect,                // Rects for lights.
  100.                                 goRect;
  101.  
  102.     AEEventHandlerUPP            openApplicationEventHandler;    // Handler for open application events.
  103.     Boolean                        openApplicationEventHandlerInstalled;    // True if handler was successfully installed.
  104.  
  105.     AEEventHandlerUPP            openDocumentsEventHandler;    // Handler for open documents events.
  106.     Boolean                        openDocumentsEventHandlerInstalled;    // True if handler was successfully installed.
  107.  
  108.     AEEventHandlerUPP            printDocumentsEventHandler;    // Handler for print documents events.
  109.     Boolean                        printDocumentsEventHandlerInstalled;    // True if handler was successfully installed.
  110.  
  111.     AEEventHandlerUPP            quitApplicationEventHandler;    // Handler for quit application events.
  112.     Boolean                        quitApplicationEventHandlerInstalled;    // True if handler was successfully installed.
  113.  
  114.     AEEventHandlerUPP            deviceAddedEventHandler;    // Handler for device added events.
  115.     Boolean                        deviceAddedEventHandlerInstalled;    // True if handler was successfully installed.
  116.  
  117.     AEEventHandlerUPP            deviceRemovedEventHandler;    // Handler for device removed events.
  118.     Boolean                        deviceRemovedEventHandlerInstalled;    // True if handler was successfully installed.
  119.  
  120.     AVTClientID                    avtClientID;            // Our client ID for the AV transport control driver family.
  121.  
  122.     Ptr                            dumpBuffer;                // Buffer for dumping video.
  123.     UInt32                        dumpBufferSize;            // Size allocated for above buffer.
  124.     Boolean                        gotSnapShot;            // True if we've gotten a snap shot.
  125.  
  126.     Boolean                        inForeground;            // True if app is in foreground.
  127.     Boolean                        quit;                    // Flag to tell event loop to quit.
  128. };
  129. typedef struct AVTTrafficLightAppDataStruct
  130.                                 AVTTrafficLightAppData,
  131.                                 *AVTTrafficLightAppDataPtr;
  132.  
  133. struct TrafficLightDataStruct
  134. {
  135.     struct TrafficLightDataStruct
  136.                                 *pNextTrafficLightData;    // Link to next data record.
  137.     WindowRef                    trafficLightWindowRef;    // Window reference for this traffic light.
  138.     AVTDriverID                    avtDriverID;        // Reference to driver we control.
  139.     Boolean                        snapShotPlaying;        // True if snap shot is playing.
  140.     Boolean                        stopped;                // State of traffic light.
  141. };
  142. typedef struct TrafficLightDataStruct
  143.                                 TrafficLightData,
  144.                                 *TrafficLightDataPtr;
  145.  
  146. #if PRAGMA_ALIGN_SUPPORTED
  147. #pragma options align=reset
  148. #endif
  149.  
  150. #if PRAGMA_IMPORT_SUPPORTED
  151. #pragma import off
  152. #endif
  153.  
  154. #ifdef __cplusplus
  155. }
  156. #endif
  157.  
  158. #endif /* __AVTRANSPORTTRAFFICLIGHT__ */
  159.